//
//  YCAlertView.h
//  YCAlertViewDemo
//
//  Created by carpenter on 2019/11/7.
//  Copyright © 2019 carpenter. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "YCAlertConfig.h"
#import "YCAlertAction.h"


//
//NS_ENUM(NSInteger ,YCAlertStyle){
//    
//    YCAlertStyleAlert,
//    
//    YCAlertStyleActionSheet,
//};
 
@interface YCAlertView : UIView


/// 初始化alert
/// @param title 标题
/// @param message 描述
/// @param config 配置信息
-(instancetype)initWithTitle:(NSString *)title message:(NSString *)message config:(YCAlertConfig *)config;


/// 添加功能按钮
/// @param action 功能按钮配置
-(void)appendAction:(YCAlertAction *)action;


/// 展示视图
-(void)show;


/// 移除视图
-(void)dismiss;

@end

@interface YCAlertView (NormalAlert)

/// 创建弹窗
/// @param title 标题
/// @param message 描述
/// @param isCancle 是否加载取消按钮
/// @param sureHandle 确认按钮点击回调
/// @param cancleHandle 取消按钮点击回调
+(void)yc_showAlertWithTitle:(NSString *)title message:(NSString *)message isCancle:(BOOL)isCancle sureHandle:(void(^)(void))sureHandle cancleHandle:(void(^)(void))cancleHandle;

@end


